bitkeeper revision 1.1108.41.1 (410a2d7a8Vn9rr5fmDlV15Z77R97-Q)
authorgm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Fri, 30 Jul 2004 11:14:02 +0000 (11:14 +0000)
committergm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk>
Fri, 30 Jul 2004 11:14:02 +0000 (11:14 +0000)
Minor fix to BVT. When a domain migrates between CPUs its AVT must always be updated.

xen/common/sched_bvt.c

index 41efe9fd1c5127eb608ec6a71ca7dcabb253cece..39f45419ddc1d2f8bf2a2c2af0865039bda5e814 100644 (file)
@@ -208,8 +208,10 @@ void bvt_wake(struct domain *d)
 
     now = NOW();
 
-    /* Set the BVT parameters. */
-    if ( inf->avt < CPU_SVT(cpu) )
+    /* Set the BVT parameters. AVT should always be updated 
+        if CPU migration ocurred.*/
+    if ( inf->avt < CPU_SVT(cpu) || 
+            unlikely(test_bit(DF_MIGRATED, &d->flags)) )
         inf->avt = CPU_SVT(cpu);
 
     /* Deal with warping here. */
@@ -227,7 +229,6 @@ void bvt_wake(struct domain *d)
     min_time = curr->lastschd + curr->min_slice;
 
     spin_unlock_irqrestore(&schedule_data[cpu].schedule_lock, flags);   
-   
     if ( is_idle_task(curr) || (min_time <= now) )
         cpu_raise_softirq(cpu, SCHEDULE_SOFTIRQ);
     else if ( schedule_data[cpu].s_timer.expires > (min_time + TIME_SLOP) )